//
//  CMDBDynamicManagerDelegate.swift
//  CMDB
//
//  Created by 王磊 on 17/4/7.
//  Copyright © 2017年 CMDB. All rights reserved.
//

import UIKit

protocol CMDBDynamicManagerDelegate: NSObjectProtocol {
    
    // 获取首页动态数据
    func queryHomeDynamicList(dynamicListParam: CMDBHomeDynamicParam,tableView: UITableView,handler: CMDBDynamicListHandler,error: CMDBHttpErrorHandler,failure: CMDBHttpFailureHandler)
    
    // 存取缓存日记列表
    func saveDynamicHome(homeBean: CMDBHomeDynamicBean,identifier: String)
    //
    func queryDynamicHomeCache(identifier: String) throws -> CMDBHomeDynamicBean
    
    // 发布动态
    /*
     创建 let pubDynamicParam = CMDBPubDynamicParam()类型的对象
     
     因为NSMutableArray 可以移除单个对象 所以在vc中用NSMutableArray创建数组
     
     let mutable = NSMutableArray()
     
     let imageParam = CMDBImageParam()
     
     imageParam.image = 图片对象 目的是为了获取 宽高像素
     
     imageParam.url = "拼接的url串"
     
     mutable.addObject(imageParam)
     
     请求的时候 优先判断 防止重复上传图片
     
     if pubDynamicParam.upload_Images.count > 0 {
     
     pubDynamicParam.upload_Images.removeAll()
     
     }
     
     调用下面接口
     */
    
    func pubDynamic(pubDynamicParam: CMDBPubDynamicParam,handler: CMDBPubDynamicHandler,error: CMDBHttpErrorHandler,failure: CMDBHttpFailureHandler) throws
    
    // 存取 删除 单挑动态
    
    func queryDynamicDetail(dynamicDetailParam: CMDBDynamicDetailParam,handler: CMDBDynamicDetailHandler,error: CMDBHttpErrorHandler,failure: CMDBHttpFailureHandler)
    
    //    func saveSingleDynamicDetail(noteBean: CMDBDynamicBean,identifier: String)
    //
    //    func querySingleDynamicDetailCache(identifier: String) throws -> CMDBDynamicBean
    //
    //    func deleteSingleDynamicDetailCache(identifier: String)
}
